From: blindwebbers@yahoogroups.com on behalf of Octavian Rasnita [orasnita@gmail.com]
Sent: Saturday, April 23, 2011 6:01 AM
To: blindwebbers@yahoogroups.com
Subject: Re: [BW] Fruit basket app in Adobe Flex/Flash
  
Hi Jamal,

The flash app is pretty accessible, although as you said, it doesn't work very well. The single thing I found harder accessible is that message with an OK button that appears when trying to add a fruit to the basket without specifying the fruit.

If I switched to another application before clicking on the OK button than going back to the browser, it I needed to find that OK button with the Jaws cursor and click it, because I couldn't use the page otherwise.

It is nice that Flash can be made accessible, but I've seen in the source code too many "accessible" words and this is a very bad design of the language. The Flash applications should be accessible by default, without needing to specify anywhere that this thing or that thing should be accessible, because otherwise nobody will care to make an aditional effort to make their Flash apps accessible.

The text fields and the buttons are accessible, but these things can be much easier made in HTML directly.

It would be interesting if the more complex controls that can't be made in HTML but that could be probably made in Flash, like list views, grid views, tree views... ofer the same accessibility.

Octavian

----- Original Message ----- 
From: "Jamal Mazrui" <empower@smart.net>
To: "programmingblind" <programmingblind@freelists.org>; <blindwebbers@yahoogroups.com>; "Program-l" <program-l@freelists.org>
Sent: Wednesday, April 20, 2011 3:40 PM
Subject: [BW] Fruit basket app in Adobe Flex/Flash

> From the archive
> http://EmpowermentZone.com/flex_fruit.zip
> 
> This fruit basket program is developed with the Adobe Flex 4 framework. 
> It uses Flash Player as a virtual machine to run code compiled from 
> one of two languages: ActionScript -- similar to JavaScript -- or MXML 
> -- a declarative markup language. The compiled code, FruitBasket.swf, 
> is hosted in a web page, FruitBasket.htm, which serves as a wrapper for 
> the app. Flash Player 10 is required on the client computer. Supported 
> web browsers are Internet Explorer and Firefox.
> 
> The free Flex 4 SDK is available in a zip archive from
> http://OpenSource.adobe.com
> 
> It includes a command-line compiler, mxmlc.exe. There are two versions 
> of the source code: FruitBasket.mxml and FruitBasket.as, using the MXML 
> approach and the ActionScript approach, respectively. The batch files 
> BuildMXML.bat and BuildAS.bat compile these files, creating 
> FruitBasket.swf (the extension stands for ShockWave Flash) in either case.
> 
> Please note, however, that although FruitBasket.as compiles, the code 
> evidently still needs some tweaking because the app does not work 
> properly. The code is left in this distribution in case others may 
> learn from it and take it furhter.
> 
> This app tries to follow best practices in developing accessible Flex 
> apps, as explained at
> http://adobe.com/accessibility
> 
> A collection of text tutorials about Flex development -- saved from 
> public web pages -- is available at
> http://EmpowermentZone.com/flex_doc.zip
> 
> Screen readers vary significantly in their client-side support for Flex 
> accessibility, which is based on MSAA. It may be necessary to manually 
> turn off a virtual or browse mode in order to interact with the app. To 
> try it, open the embedding HTML file, either locally after unzipping the 
> archive, or via the following web address:
> http://EmpowermentZone.com/FruitBasket.htm
> 
> The archive will soon be available on
> http://FruitBasketDemos.org
> 
> For convenient reference, the FruitBasket.mxml code is also pasted below.
> 
> Jamal Mazrui
> 
> <?xml version="1.0" encoding="utf-8"?>
> <!-- Public domain fruit basket program in MXML
> By Jamal Mazrui on April 20, 2011 -->
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:mx="library://ns.adobe.com/flex/mx"
> minWidth = "955" minHeight = "600" creationComplete = "initApp()">
> 
> <fx:Declarations>
> <!-- Place non-visual elements (e.g., services, value objects) here -->
> </fx:Declarations>
> 
> <!-- Place UI components here -->
> <s:HGroup id = "hgrpAdd" accessibilityEnabled = "true">
> <s:Label id = "lblFruit" accessibilityEnabled = "false" text = "Fruit:" 
> tabEnabled = "false"/>
> <s:TextInput id = "txtFruit" accessibilityEnabled = "true" 
> accessibilityName = "Fruit:" tabIndex = "1"/>
> <s:Button id = "btnAdd" accessibilityEnabled = "true" label = "Add" 
> tabIndex = "2" click = "addFruit();"/>
> </s:HGroup>
> 
> <s:HGroup id = "hgrpDelete" accessibilityEnabled = "true">
> <s:Label id = "lblBasket" accessibilityEnabled = "false" text = 
> "Basket:" tabEnabled = "false"/>
> <s:List id = "lstBasket" accessibilityEnabled = "true" accessibilityName 
> = "Basket:" tabIndex = "3">
> <s:dataProvider>
> <mx:ArrayList>
> </mx:ArrayList>
> </s:dataProvider>
> </s:List>
> 
> <s:Button id = "btnDelete" accessibilityEnabled = "true" label = 
> "Delete" tabIndex = "4" click = "deleteFruit();"/>
> </s:HGroup>
> 
> <!-- Place ActionScript event handlers here -->
> <fx:Script>
> <![CDATA[
> import mx.controls.Alert;
> 
> private function initApp(): void {
> if (Capabilities.hasAccessibility && !this.accessibilityProperties) {
> this.accessibilityProperties = new AccessibilityProperties();
> this.accessibilityProperties.silent = false;
> this.accessibilityProperties.forceSimple = false;
> Accessibility.updateProperties();
> }
> 
> this.defaultButton = btnAdd;
> txtFruit.setFocus();
> } // initApp method
> 
> private function addFruit():void {
> var sFruit: String = txtFruit.text;
> var iLength: int = sFruit.length;
> if (iLength == 0) Alert.show("No fruit to add!", "Alert");
> else {
> lstBasket.dataProvider.addItem(sFruit);
> var iIndex: int = lstBasket.dataProvider.length - 1;
> lstBasket.selectedIndex = iIndex;
> txtFruit.text = "";
> }
> } // addFruit method
> 
> private function deleteFruit(): void {
> var iIndex: int = lstBasket.selectedIndex;
> if (iIndex == -1) Alert.show("No fruit to delete!", "Alert");
> else {
> lstBasket.dataProvider.removeItemAt(iIndex);
> var iLength:int = lstBasket.dataProvider.length;
> if (iIndex == iLength) iIndex --;
> if (iIndex >=0) lstBasket.selectedIndex = iIndex;
> }
> } // deleteFruit method
> ]]>
> </fx:Script>
> </s:Application>
>


__._,_.___
Reply to sender | Reply to group | Reply via web post | Start a New Topic 
Messages in this topic (2) 
Recent Activity: a.. New Members 2 
Visit Your Group 
<*> To contact the moderator, send an email to:
blindwebbers-owner@yahoogroups.com 
 Switch to: Text-Only, Daily Digest  Unsubscribe  Terms of Use.
 
__,_._,___